extends "../cTDW/cTDW.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "卫士"
	lv = 2
	attCoe.atkRan = 1
	attCoe.atk = 10 / 8.5 * 2 / 2
	attCoe.maxHp = 1000 / 112.5 / 2
	attCoe.def = 50 / 15.0 / 2.0
	attCoe.mgiDef = 50 / 16.6 / 2.0

	addSkillTxt("守护：普攻为周围1格内队友增加2层<魔御><抵御> 和 自身生命上限1%的护盾值")
	
func _onAtkChara(atkinfo):
	._onAtkChara(atkinfo)
	if atkinfo.hitCha != self && atkinfo.atkType == Chara.AtkType.NORMAL:
		var chas = getAllChas(2)
		for i in chas:
			if i == self:continue
			if abs(i.cell.x - cell.x ) <=1 && abs(i.cell.y - cell.y) <= 1:
				i.addBuff(b_moYu.new(2))
				i.addBuff(b_diYu.new(2))
				if i.has_method("changeShield"):
					i.changeShield(att.maxHp * 0.01)